From 47ab9b2dc975db8d8a1f841956e4576f9b651e4a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 24 Jun 2005 13:49:34 +0000 Subject: [PATCH] Don't jump to the next line if we are at the end of the line. 2005-06-24 Matthias Clasen * gtk/gtktextview.c (gtk_text_view_scroll_hpages): Don't jump to the next line if we are at the end of the line. --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ gtk/gtktextview.c | 5 ++++- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e52f916e94..d4e8630f89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-06-24 Matthias Clasen + + * gtk/gtktextview.c (gtk_text_view_scroll_hpages): Don't + jump to the next line if we are at the end of the line. + 2005-06-23 Tor Lillqvist Improve and simplify line segment rendering on Win32, especially diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index e52f916e94..d4e8630f89 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2005-06-24 Matthias Clasen + + * gtk/gtktextview.c (gtk_text_view_scroll_hpages): Don't + jump to the next line if we are at the end of the line. + 2005-06-23 Tor Lillqvist Improve and simplify line segment rendering on Win32, especially diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index e52f916e94..d4e8630f89 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2005-06-24 Matthias Clasen + + * gtk/gtktextview.c (gtk_text_view_scroll_hpages): Don't + jump to the next line if we are at the end of the line. + 2005-06-23 Tor Lillqvist Improve and simplify line segment rendering on Win32, especially diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index daa10ea497..e22913cf87 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -4752,6 +4752,8 @@ gtk_text_view_move_cursor_internal (GtkTextView *text_view, break; case GTK_MOVEMENT_PARAGRAPHS: + g_print ("move paragraphs: %d %d\n", + count, gtk_text_iter_get_line_offset (&newplace)); if (count > 0) { if (!gtk_text_iter_ends_line (&newplace)) @@ -5027,7 +5029,8 @@ gtk_text_view_scroll_hpages (GtkTextView *text_view, else if (count > 0 && adj->value >= (adj->upper - adj->page_size - 1e-12)) { /* already at far right, just be sure we are at the end */ - gtk_text_iter_forward_to_line_end (&new_insert); + if (!gtk_text_iter_ends_line (&new_insert)) + gtk_text_iter_forward_to_line_end (&new_insert); move_cursor (text_view, &new_insert, extend_selection); } else -- 2.30.2